package com.portal.back.web.DTO;

import java.util.ArrayList;
import java.util.List;

public class TreeDto {
	private Long id;
	private String text;
	private String qtip;
	private String href;
	private String uuid;
	private List<TreeDto> children;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUuid() {
		return this.uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getCls() {
		return ((this.children.size() != 0) ? "folder" : "cls");
	}

	public String getIconCls() {
		return ((this.children.size() == 0) ? "icon-menu-new" : "");
	}

	public boolean isLeaf() {
		return (this.children.size() == 0);
	}

	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getQtip() {
		return ((this.qtip == null) ? "" : this.qtip);
	}

	public void setQtip(String qtip) {
		this.qtip = qtip;
	}

	public String getHref() {
		return ((this.href == null) ? "" : this.href);
	}

	public void setHref(String href) {
		this.href = href;
	}

	@SuppressWarnings("unchecked")
	public List<TreeDto> getChildren() {
		return ((this.children == null) ? new ArrayList() : this.children);
	}

	public void setChildren(List<TreeDto> children) {
		this.children = children;
	}

}
